<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message"/>
    

        <rich:panel>
            <f:facet name="header">快餐店信息</f:facet>
    
        <table>
          <tr class="prop">
            <td class="name">店名:</td>
            <td class="value">#{viewSnackShopAction.shop.name}</td>
          </tr>
          <tr class="prop">
            <td class="name">电话号码:</td>
            <td class="value">#{viewSnackShopAction.shop.telNo}</td>
          </tr>
          <tr class="prop">
            <td class="name">地址:</td>
            <td class="value">#{viewSnackShopAction.shop.address}</td>
          </tr>
          <tr class="prop">
            <td class="name">备注:</td>
            <td class="value">#{viewSnackShopAction.shop.memo}</td>
          </tr>

        </table>
            <div style="clear:both"/>
      </rich:panel>  

      <br/>
        <rich:panel>
            <f:facet name="header">菜单列表</f:facet>
    	<table>
    		<tr valign="top">
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期一</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getMonDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td>
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期二</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getTuesDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td>
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期三</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getWedDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td> 
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期四</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getThuDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td>  
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期五</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getFriDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td> 
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期六</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getSatDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td>   
    			<td>
			        <table style="width: 150px;">
			          <tr class="prop">
			            <td colspan="2">   星期日</td>
			          </tr>
			          <ui:repeat value="#{appUtils.getSunDishes(viewSnackShopAction.shop)}" var="dish">
				          <tr class="prop">
				            <td>
				            	<s:link view="/viewDish.xhtml" value="#{dish.name}">
				            		<f:param value="#{dish.id}" name="dishId"/>
				            	</s:link>
				            </td>
				          </tr>	 
			          </ui:repeat>
			        </table>    			
    			</td>      			  			     			    			
    		</tr>
    	</table>
            <div style="clear:both"/>
      </rich:panel>  
</ui:define>

</ui:composition>

